package com.czxy.tanhua.autoconfig;

import com.czxy.tanhua.autoconfig.properties.FaceProperties;
import com.czxy.tanhua.autoconfig.properties.OssProperties;
import com.czxy.tanhua.autoconfig.properties.SmsProperties;
import com.czxy.tanhua.autoconfig.template.FaceTemplate;
import com.czxy.tanhua.autoconfig.template.OssTemplate;
import com.czxy.tanhua.autoconfig.template.SmsTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * @Author 爱吃豆的土豆、
 * @Date 2023/3/29 11:03
 */
@EnableConfigurationProperties(value = {SmsProperties.class, OssProperties.class, FaceProperties.class})
public class TanhuaAutoConfiguration {
    @Bean
    private SmsTemplate smsTemplate(SmsProperties smsProperties){
        return new SmsTemplate(smsProperties);
    }
    @Bean
    private OssTemplate ossTemplate(OssProperties ossProperties){
        return new OssTemplate(ossProperties);
    }
    @Bean
    private FaceTemplate faceTemplate(FaceProperties faceProperties){
        return new FaceTemplate(faceProperties);
    }
}
